get count of relationship table laravel

33

get count of relationship table laravel -

Category::where('parent_id', 0)->withCount('articles')->get();

Comments

Submit
0 Comments